#!/usr/bin/env python
# -*- coding:utf-8 -*-
'''
@File   :   config.py
@Author :   Song
@Time   :   2022/2/28 21:48
@Contact:   songjian@westlake.edu.cn
@intro  : 
'''
train_npz = '/home/songjian/Alpha-Filter/npz/train.npz'
eval_npz = '/home/songjian/Alpha-Filter/npz/eval.npz'

train_output_dir = '/home/songjian/Alpha-Filter/train_output'

import torch
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

residues = {
        "G": 57.021463735,
        "A": 71.037113805,
        "S": 87.032028435,
        "P": 97.052763875,
        "V": 99.068413945,
        "T": 101.047678505,
        "c": 103.009184505 + 57.02146,
        "L": 113.084064015,
        "I": 113.084064015,
        "N": 114.042927470,
        "D": 115.026943065,
        "Q": 128.058577540,
        "K": 128.094963050,
        "E": 129.042593135,
        "M": 131.040484645,
        "H": 137.058911875,
        "F": 147.068413945,
        "R": 156.101111050,
        "Y": 163.063328575,
        "W": 186.079312980,
        "m": 131.040484645 + 15.994915,  # Met Oxidation
    }
amino_acids = list(residues.keys()) + ["$"]
g_aa_to_idx = {k: (i+1) for i, k in enumerate(amino_acids)}
g_idx_to_aa = {v: k for k, v in g_aa_to_idx.items()}

## Transformer
max_charge = 7
dim_model = 64
n_head = 4
dim_feedforward = 64
n_layers = 4
dropout = 0
dim_intensity = None
max_length = 30

## Train
batch_size = 32
num_workers = 8
epochs = 10
shuffle = True

## test
test_batch_size = 32
test_num_workers = 0
beam_size = 10
top_n = 5 # 每个位点氨基酸的保留数目
ppm = 10 # MS1